ip dhcp-client default-route

This command configures the device to accept the gateway received via DHCP as the default route for this interface or for a specific VRF on this interface.

Use the “no” form of this command to disregard the gateway received via DHCP.

Syntax

ip dhcp-client default-route [track <track id>] [vrf <VRF name>]

Command

Description

default-route

Defines the gateway received via DHCP as the default route on this interface.

track id

Defines a track ID that the default route depends on. The range is 1-100.

vrf

Defines the VRF (or "main-vrf").for which the gateway received via DHCP is the default route.

Default

no ip dhcp-client default-route

Command Mode

Privileged User

Related Commands

ip address dhcp

Example

This example configures a new vlan interface, enables dhcp & default gateway

(config-data)# interface vlan 3
(conf-if-VLAN 3)# ip address dhcp
(conf-if-VLAN 3)# ip dhcp-client default-route track 1
(conf-if-VLAN 3)# no shutdown
(conf-if-VLAN 3)# exit